#include <stdio.h>
#include <stdlib.h>
int main()
{
    FILE *fp = fopen("fseek.txt", "r+");
    char ch;
    if (fp == NULL)
    {
        printf("file error\n");
        exit(1);
    }
    fseek(fp, 5L, SEEK_SET);
    ch = getc(fp);
    printf("%c", ch);
    fseek(fp, 5L, SEEK_SET);
    fseek(fp, 2L, SEEK_CUR);
    ch = getc(fp);

    fseek(fp, 5L, SEEK_SET);
    fseek(fp, -2L, SEEK_CUR);
    ch = getc(fp);
    printf("%c", ch);

    fclose(fp);
    return 0;
}